<html>

<head>
    <script src="ws-audio-api/dist/ws-audio-api.min.js"></script>
</head>
<body>
<script>
    // defaultConfig = {
    //     codec: {
    //         sampleRate: 24000,
    //         channels: 1,
    //         app: 2048,
    //         frameDuration: 20,
    //         bufferSize: 4096
    //     },
    //     server: {
    //         host: "ws://localhost",
    //         port: "8081"
    //     }
    // }
    var ws = new WebSocket("ws://localhost:8081/echos?mode=stream&channel=channel0");
    
    streamer = new WSAudioAPI.Streamer({}, ws);
    // streamer.conf = conf;
    streamer.start();
    var ws = new WebSocket("ws://localhost:8081/echos?mode=play&channel=channel0");
    player = new WSAudioAPI.Player({}, ws);
    player.start();
</script>
</body>
</html>